from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()
driver.set_window_size(980,980)

first_url = "https://www.baidu.com"
driver.get(first_url)

second_url = "https://news.baidu.com"
driver.get(second_url)

time.sleep(5)

driver.back()

time.sleep(3)

driver.forward()

time.sleep(3)

driver.refresh()

time.sleep(5)
driver.quit()


